<template>
    <div class="boxx">
        <div class="box">
              <form action="">
                 账号：<input type="text" v-model="name">
                 <br>
                 密码：<input type="text" v-model="pwd">
                 <br>
                 <button @click="add" class="dl">登录</button>
              </form>
        </div>
    </div>
</template>

<script>
export default {
    name: 'MobanIndex',

    data() {
        return {
            name:"",
            pwd:'',
        };
    },

    mounted() {
        
    },

    methods: {
        add(){
            if(this.name=="aa"&&this.pwd=="123456"){
                this.$router.push('/my')
            }
        }
    },
};
</script>

<style lang="scss" scoped>
.boxx{
    width: 100%;
    height: 100vh;
    background-color: cornflowerblue;
    
    position: relative;
}
    .box{
        width: 400px;
        height: 200px;
        background-color: cadetblue;
        position: absolute;
        left: 400px;
        top: 300px;
        padding-left: 60px;
        padding-top: 60px;
       
      
    }
    .dl{
        width: 200px;
        height: 30px;
        background-color: cornflowerblue;
        border: none;
        color: white;
        
        margin-left: 40px;
        margin-top: 20px;
    }
</style>